<script src="https://unpkg.com/vue"></script>

<div id="app">
  <p>{{ message }}</p>
  <a v-bind:href="url">baidu</a>
  <button v-on:click='hello'>click</button>

  <form v-on:submit.prevent="onSubmit">
    <button type="submit">submit</button>
  </form>

</div>

<script>
  new Vue({
    el: '#app',
    data: {
      message: 'Hello Vue.js!',
      url: 'http://www.baidu.com'
    },
    methods: {
      hello: function () {
        alert('ok.');
      },
      onSubmit: function () {
        alert('submit.');
      }
    }
  });

</script>
